package com.use.utils.db;

import cn.hutool.db.Db;
import cn.hutool.db.Entity;

import java.sql.SQLException;

public class TestMoreDataSource03 {
    public static void main(String[] args) throws SQLException {
        Db hutool1 = Db.use("hutool1");
        Db hutool2 = Db.use("hutool2");
        int insert = hutool1.insert(Entity.create("user").set("name", "unitTestUser")
                .set("age", 66));
        int insert2 = hutool2.insert(Entity.create("user").set("name", "unitTestUser")
                .set("age", 66));
        System.out.println(insert);
        System.out.println(insert2);
//        hutool1.execute("delete from user where name = 'unitTestUser'");
//        List<Entity> query = hutool1.query("select * from user");
//        System.out.println(query);

    }
}
